package com.kangzhili.nettypush.dto;

import lombok.Data;

/**
 * WebSocket请求结果通用结构
 * @param <T> 结果数据类型
 */
@Data
public class ResponseBody<T> {
    /**
     * 结果码（如0成功，非0失败）
     */
    private int resultCode;
    /**
     * 用户ID
     */
    private String userId;
    /**
     * 结果数据
     */
    private T data;

    public ResponseBody() {}

    public ResponseBody(int resultCode, String userId, T data) {
        this.resultCode = resultCode;
        this.userId = userId;
        this.data = data;
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
} 